﻿<!DOCTYPE html>
<html>
	<meta charset="UTF-8"/>
	<head>
		<script>
			
			var num = 5 + 3;   //8
			var num2 = "5" + 3;  //53
			var num3 = "5" - 3;  //2
			var num4 = "5" * 3;  //15
			var num5 = "6"/3;
			
			//类型转换
			//alert(num5);
			
			
			var num6 = "123abc"-5;
			//alert(num6); //NaN   Not a Number
			
			//parseInt用来做强制的手动类型转换
			//alert( parseInt("123abc") );
			//alert( parseInt("xyz123") );
			
			//alert( parseFloat("1.9876") );
			
			
			//alert( Number("100") );
			//alert( Number("100abc") );
			
			//alert( typeof NaN );
			//alert( 5 == 5);
			//alert( NaN == NaN );
			//alert( 5 == "5");
			
			
			//自动类型转换
			// - * / % == 
			
			
			
		</script>
	</head>
	<body>
		
	</body>
</html>











